package com.fusion.config.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * 校验登录拦截器配置
 * @author louis
 *
 */
@Configuration
public class CheckLoginConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //校验是否登录拦截器
        registry.addInterceptor(new CheckLoginInterceptor())
        .excludePathPatterns("/swagger-resources/**")
        .excludePathPatterns("/v2/api-docs")
        .excludePathPatterns("/v1dnmIGQAr.txt")
        .excludePathPatterns("/endpointChat")
        .excludePathPatterns("/classify/**")
        .excludePathPatterns("/login/**");
    }
}
